<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui" >
    <h:head>
        <title>Create Message</title>
    </h:head>
    <h:body>
        <h:outputStylesheet name="default.css" />
        <h:form>
            <p:panel id="panel" header="Create Message" style="margin-bottom:10px;">  
                <p:messages id="messages" globalOnly="true" />  
                <h:panelGrid columns="3">  

                    <p:outputLabel for="title" value="Title: " />  
                    <p:inputText id="title" value="#{messageBean.message.title}" 
                                 required="true" >  
                    </p:inputText>
                    <p:message for="message"/>
                    <p:outputLabel for="message" value="Message: " />  
                    <p:inputText id="message" value="#{messageBean.message.message}" 
                                 required="true"/>  
                    <p:message for="message"/>
       
                </h:panelGrid>  
            </p:panel>  

            <p:commandButton value="Create" update="panel" action="#{messageBean.saveMessage()}"/>
            <p:commandButton value="Back" update="panel" action="#{messageBean.toTwittererOverView()}" immediate="true"/>
        </h:form>
    </h:body> 
</html>  
